﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="it_security_project.Register" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<form runat="server">
    <asp:ValidationSummary ID="ValidationSummary" runat="server" CssClass="validationcolor" ValidationGroup="RegisterValidation"
    HeaderText="An error has occured, please correct the errors and try again."/>

    <br />
    <div class="Register">
        <div class="left">
        <asp:Label ID="UsernameLabel" runat="server">Username</asp:Label>
        </div>
        <div class="right">
        <asp:TextBox ID="UsernameTextBox" runat="server" MaxLength="30"></asp:TextBox>
        </div>
        <asp:RequiredFieldValidator ID="UsernameRequiredFieldValidator" runat="server" Display="Dynamic" ValidationGroup="RegisterValidation"
         ErrorMessage="You have to write in a username!" ControlToValidate="UsernameTextBox">*</asp:RequiredFieldValidator>
        <div class="left">
        <asp:Label ID="PasswordLabel" runat="server">Password</asp:Label>
        </div>
        <div class="right">
        <asp:TextBox ID="PasswordTextBox" runat="server" MaxLength="30" TextMode="Password"></asp:TextBox>
        </div>
        <asp:RequiredFieldValidator ID="PasswordRequiredFieldValidator" runat="server" Display="Dynamic" ValidationGroup="RegisterValidation"
         ErrorMessage="You have to write in a Password!" ControlToValidate="PasswordTextBox">*</asp:RequiredFieldValidator>
        <div class="left">
        <asp:Label ID="RepeatPasswordLabel" runat="server">Repeat Password</asp:Label>
        </div>
        <div class="right">
        <asp:TextBox ID="RepeatPasswordTextBox" runat="server" MaxLength="30" TextMode="Password"></asp:TextBox>
        </div>
        <asp:RequiredFieldValidator ID="RepeatPasswordRequiredFieldValidator" runat="server" Display="Dynamic" ValidationGroup="RegisterValidation"
         ErrorMessage="You have to confirm your password!" ControlToValidate="RepeatPasswordTextBox">*</asp:RequiredFieldValidator>
        <asp:CompareValidator ID="RepeatPasswordCompareValidator" runat="server" ErrorMessage="Your Password doesn't match!"
        ControlToCompare="PasswordTextBox" ControlToValidate="RepeatPasswordTextBox" ValidationGroup="RegisterValidation">*</asp:CompareValidator>
        <div class="left">
        <asp:Label ID="EmailLabel" runat="server">Email</asp:Label>
        </div>
        <div class="right">
        <asp:TextBox ID="EmailTextBox" runat="server" MaxLength="30"></asp:TextBox>
        </div>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" Display="Dynamic" ValidationGroup="RegisterValidation"
         ErrorMessage="You have to write in an Email!" ControlToValidate="UsernameTextBox">*</asp:RequiredFieldValidator>
        <div class="left">
         <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="Not a valid email adress"
              ControlToValidate="EmailTextBox" Display="Dynamic" ValidationExpression="^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$"
               CssClass="field-validation-error" ValidationGroup="RegisterValidation">*</asp:RegularExpressionValidator>
        <asp:Label ID="SecurityQuestionLabel" runat="server">Security Question</asp:Label>
        </div>
        <div class="right">
        <asp:TextBox ID="SecurityQuestionTextbox" runat="server" MaxLength="100"></asp:TextBox>
        </div>
        <asp:RequiredFieldValidator ID="SecurityQuestionRequiredFieldValidator" runat="server" Display="Dynamic" ValidationGroup="RegisterValidation"
         ErrorMessage="You have to write in a security question" ControlToValidate="UsernameTextBox">*</asp:RequiredFieldValidator>
        <div class="left">
        <asp:Label ID="SecurityQuestionAnswerLabel" runat="server">Security Question Answer</asp:Label>
        </div>
        <div class="right">
        <asp:TextBox ID="SecurityQuestionAnswerTextbox" runat="server" MaxLength="100"></asp:TextBox>
        </div>
        <asp:RequiredFieldValidator ID="SecurityQuestioAnswerRequiredFieldValidator" runat="server" Display="Dynamic" ValidationGroup="RegisterValidation"
         ErrorMessage="You have to write in an answer to your security question!" ControlToValidate="UsernameTextBox">*</asp:RequiredFieldValidator>
        <div class="left">

        <asp:Image ID="ImageCaptacha" runat="server" CssClass="CaptchaImage" />
        <asp:TextBox ID="TextBoxCaptcha" runat="server"></asp:TextBox>

        <asp:Button ID="RegisterButton" runat="server" Text="Register" CommandName="Insert" OnClick="RegisterButton_Click" ValidationGroup="RegisterValidation" CausesValidation="true" />
        </div>

        <asp:Label ID="FUUUSK" Enabled="false" Visible="false" runat="server" Text="Label"></asp:Label>

    </div>
    <%-- </InsertItemTemplate>
        
    </asp:ListView> --%>
    </form>
</asp:Content>

